package com.pig4cloud.pig.djjk.domain.po;


import java.util.List;
import java.util.Map;

/**
 * @className: Alert
 * @description: TODO 类描述
 * @author: liumingkun
 * @date: 2025/5/16
 **/
public class Alert {
    private String id;
    private double alert_time;
    private Device device;
    private Source source;
    private Alg alg;
    private String hazard_level;
    private String image;
    private ReservedData reserved_data;

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getAlert_time() {
        return alert_time;
    }

    public void setAlert_time(double alert_time) {
        this.alert_time = alert_time;
    }

    public Device getDevice() {
        return device;
    }

    public void setDevice(Device device) {
        this.device = device;
    }

    public Source getSource() {
        return source;
    }

    public void setSource(Source source) {
        this.source = source;
    }

    public Alg getAlg() {
        return alg;
    }

    public void setAlg(Alg alg) {
        this.alg = alg;
    }

    public String getHazard_level() {
        return hazard_level;
    }

    public void setHazard_level(String hazard_level) {
        this.hazard_level = hazard_level;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public ReservedData getReserved_data() {
        return reserved_data;
    }

    public void setReserved_data(ReservedData reserved_data) {
        this.reserved_data = reserved_data;
    }

    // Nested classes
    public static class Device {
        private String id;
        private String name;
        private String desc;

        // Getters and Setters
        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    public static class Source {
        private String id;
        private String ipv4;
        private String desc;

        // Getters and Setters
        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getIpv4() {
            return ipv4;
        }

        public void setIpv4(String ipv4) {
            this.ipv4 = ipv4;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    public static class Alg {
        private String name;
        private String ch_name;
        private String type;

        // Getters and Setters
        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getCh_name() {
            return ch_name;
        }

        public void setCh_name(String ch_name) {
            this.ch_name = ch_name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }
    }

    public static class ReservedData {
        private Bbox bbox;
        private Map<String, CustomItem> custom;

        // Getters and Setters
        public Bbox getBbox() {
            return bbox;
        }

        public void setBbox(Bbox bbox) {
            this.bbox = bbox;
        }

        public Map<String, CustomItem> getCustom() {
            return custom;
        }

        public void setCustom(Map<String, CustomItem> custom) {
            this.custom = custom;
        }
    }

    public static class Bbox {
        private List<Rectangle> rectangles;
        private Map<String, Object> polygons;
        private Map<String, Object> lines;

        // Getters and Setters
        public List<Rectangle> getRectangles() {
            return rectangles;
        }

        public void setRectangles(List<Rectangle> rectangles) {
            this.rectangles = rectangles;
        }

        public Map<String, Object> getPolygons() {
            return polygons;
        }

        public void setPolygons(Map<String, Object> polygons) {
            this.polygons = polygons;
        }

        public Map<String, Object> getLines() {
            return lines;
        }

        public void setLines(Map<String, Object> lines) {
            this.lines = lines;
        }
    }

    public static class Rectangle {
        private List<Integer> xyxy;
        private List<Integer> color;
        private String label;
        private double conf;
        private Map<String, Object> ext;

        // Getters and Setters
        public List<Integer> getXyxy() {
            return xyxy;
        }

        public void setXyxy(List<Integer> xyxy) {
            this.xyxy = xyxy;
        }

        public List<Integer> getColor() {
            return color;
        }

        public void setColor(List<Integer> color) {
            this.color = color;
        }

        public String getLabel() {
            return label;
        }

        public void setLabel(String label) {
            this.label = label;
        }

        public double getConf() {
            return conf;
        }

        public void setConf(double conf) {
            this.conf = conf;
        }

        public Map<String, Object> getExt() {
            return ext;
        }

        public void setExt(Map<String, Object> ext) {
            this.ext = ext;
        }
    }

    public static class CustomItem {
        private List<Integer> current_position;
        private int track_id;
        private double update_time;

        // Getters and Setters
        public List<Integer> getCurrent_position() {
            return current_position;
        }

        public void setCurrent_position(List<Integer> current_position) {
            this.current_position = current_position;
        }

        public int getTrack_id() {
            return track_id;
        }

        public void setTrack_id(int track_id) {
            this.track_id = track_id;
        }

        public double getUpdate_time() {
            return update_time;
        }

        public void setUpdate_time(double update_time) {
            this.update_time = update_time;
        }
    }

    @Override
    public String toString() {
        return "Alert{" +
                "id='" + id + '\'' +
                ", alert_time=" + alert_time +
                ", device=" + device +
                ", source=" + source +
                ", alg=" + alg +
                ", hazard_level='" + hazard_level + '\'' +
                ", image='" + image + '\'' +
                ", reserved_data=" + reserved_data +
                '}';
    }
}
